<!-- 
关联客户 
-->
<template>
    <ElSelect filterable clearable :="$attrs">
        <ElOption v-for="item in options" :key="item.zxid" :label="item.zxkhmc" :value="item.zxid" />
    </ElSelect>
</template>

<script setup lang="ts">
import { ref, onMounted, watch } from 'vue'
import { ElSelect, ElOption } from 'element-plus'
import { getConsultationListByCustomerView } from '../api'

interface Props {
    data: any;
}
const props = withDefaults(defineProps<Props>(), {
    data: () => ({}),
})

const options = ref<Array<{ zxkhmc: string, zxid: string }>>([])

const getOptions = () => {
    getConsultationListByCustomerView({})
        .then(res => {
            options.value = res
        })
}

onMounted(() => {
    getOptions()
})


</script>